<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>班级管理</title>
<script type="text/javascript">
	function del(id) {
		if(confirm("是否删除这条记录！")){
			window.location="banji?method=delete&id="+id;
		}
	}
	
	function add(){
		window.location="banji?method=add";
	}
	
	function fh(){
		window.location="course?method=fh";
	}
</script>
<style type="text/css">
	.abc{
		border: 2px solid #99CCFF;
		border-radius:15px;
		width: 600px;
		padding-bottom: 50px;
		padding-left: 10px;
		padding-right: 10px;
	}
	
	table{
		width:100%;
		border-radius:6px;
	}
	
	th{
		background-color: #CCE8EB;
	}
	
	h2{
		text-align: center;
	}
	
	button{
		border: 1px solid #99CCFF;
		width:85px;
		margin-bottom: 3px;
		border-radius:4px;
	}
	
	
</style>
</head>
<body>
<div class="abc">
	<h2>班级管理</h2>
	<button onclick="add()">新增</button>
	
	<table border="1" style="min-width: 350px;text-align: center;vertical-align:middle">
		<tr>
			<th>序号</th>
			<th>班级</th>
			<th>班主任</th>
			<th colspan="2">操作</th>
		</tr>
		<c:forEach items="${list}" var="bj">
		<tr>
			<td>${bj.id}</td>
			<td>${bj.name}</td>
			<td>${bj.manager}</td>
			<td><a href="banji?method=update&id=${bj.id}">修改</a></td>
			<td><a href="javaScript:del(${bj.id})">删除</a></td>
		</tr>
	</c:forEach>
	</table>
	<button onclick="fh()" style="margin-top: 5px;float: right;">返回</button>
</div>	
</body>
</html>